Optimal. Leaf size=249 \[ -\frac {2 \left (10 a A b+5 a^2 B+3 b^2 B+6 a b C\right ) E\left (\left .\frac {1}{2} (c+d x)\right |2\right )}{5 d}+\frac {2 \left (14 a b B+7 a^2 (3 A+C)+b^2 (7 A+5 C)\right ) F\left (\left .\frac {1}{2} (c+d x)\right |2\right )}{21 d}+\frac {2 b (7 b B+4 a C) \sin (c+d x)}{35 d \cos ^{\frac {5}{2}}(c+d x)}+\frac {2 \left (7 A b^2+14 a b B+4 a^2 C+5 b^2 C\right ) \sin (c+d x)}{21 d \cos ^{\frac {3}{2}}(c+d x)}+\frac {2 \left (10 a A b+5 a^2 B+3 b^2 B+6 a b C\right ) \sin (c+d x)}{5 d \sqrt {\cos (c+d x)}}+\frac {2 C (b+a \cos (c+d x))^2 \sin (c+d x)}{7 d \cos ^{\frac {7}{2}}(c+d x)} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.43, antiderivative size = 249, normalized size of antiderivative = 1.00, number of steps
used = 8, number of rules used = 8, integrand size = 43, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.186, Rules used = {4197, 3126,
3110, 3100, 2827, 2716, 2719, 2720} \begin {gather*} \frac {2 F\left (\left .\frac {1}{2} (c+d x)\right |2\right ) \left (7 a^2 (3 A+C)+14 a b B+b^2 (7 A+5 C)\right )}{21 d}-\frac {2 E\left (\left .\frac {1}{2} (c+d x)\right |2\right ) \left (5 a^2 B+10 a A b+6 a b C+3 b^2 B\right )}{5 d}+\frac {2 \sin (c+d x) \left (4 a^2 C+14 a b B+7 A b^2+5 b^2 C\right )}{21 d \cos ^{\frac {3}{2}}(c+d x)}+\frac {2 \sin (c+d x) \left (5 a^2 B+10 a A b+6 a b C+3 b^2 B\right )}{5 d \sqrt {\cos (c+d x)}}+\frac {2 b (4 a C+7 b B) \sin (c+d x)}{35 d \cos ^{\frac {5}{2}}(c+d x)}+\frac {2 C \sin (c+d x) (a \cos (c+d x)+b)^2}{7 d \cos ^{\frac {7}{2}}(c+d x)} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 2716
Rule 2719
Rule 2720
Rule 2827
Rule 3100
Rule 3110
Rule 3126
Rule 4197
Rubi steps
\begin {align*} \int \frac {(a+b \sec (c+d x))^2 \left (A+B \sec (c+d x)+C \sec ^2(c+d x)\right )}{\sqrt {\cos (c+d x)}} \, dx &=\int \frac {(b+a \cos (c+d x))^2 \left (C+B \cos (c+d x)+A \cos ^2(c+d x)\right )}{\cos ^{\frac {9}{2}}(c+d x)} \, dx\\ &=\frac {2 C (b+a \cos (c+d x))^2 \sin (c+d x)}{7 d \cos ^{\frac {7}{2}}(c+d x)}+\frac {2}{7} \int \frac {(b+a \cos (c+d x)) \left (\frac {1}{2} (7 b B+4 a C)+\frac {1}{2} (7 A b+7 a B+5 b C) \cos (c+d x)+\frac {1}{2} a (7 A+C) \cos ^2(c+d x)\right )}{\cos ^{\frac {7}{2}}(c+d x)} \, dx\\ &=\frac {2 b (7 b B+4 a C) \sin (c+d x)}{35 d \cos ^{\frac {5}{2}}(c+d x)}+\frac {2 C (b+a \cos (c+d x))^2 \sin (c+d x)}{7 d \cos ^{\frac {7}{2}}(c+d x)}-\frac {4}{35} \int \frac {-\frac {5}{4} \left (7 A b^2+14 a b B+4 a^2 C+5 b^2 C\right )-\frac {7}{4} \left (10 a A b+5 a^2 B+3 b^2 B+6 a b C\right ) \cos (c+d x)-\frac {5}{4} a^2 (7 A+C) \cos ^2(c+d x)}{\cos ^{\frac {5}{2}}(c+d x)} \, dx\\ &=\frac {2 b (7 b B+4 a C) \sin (c+d x)}{35 d \cos ^{\frac {5}{2}}(c+d x)}+\frac {2 \left (7 A b^2+14 a b B+4 a^2 C+5 b^2 C\right ) \sin (c+d x)}{21 d \cos ^{\frac {3}{2}}(c+d x)}+\frac {2 C (b+a \cos (c+d x))^2 \sin (c+d x)}{7 d \cos ^{\frac {7}{2}}(c+d x)}-\frac {8}{105} \int \frac {-\frac {21}{8} \left (10 a A b+5 a^2 B+3 b^2 B+6 a b C\right )-\frac {5}{8} \left (14 a b B+7 a^2 (3 A+C)+b^2 (7 A+5 C)\right ) \cos (c+d x)}{\cos ^{\frac {3}{2}}(c+d x)} \, dx\\ &=\frac {2 b (7 b B+4 a C) \sin (c+d x)}{35 d \cos ^{\frac {5}{2}}(c+d x)}+\frac {2 \left (7 A b^2+14 a b B+4 a^2 C+5 b^2 C\right ) \sin (c+d x)}{21 d \cos ^{\frac {3}{2}}(c+d x)}+\frac {2 C (b+a \cos (c+d x))^2 \sin (c+d x)}{7 d \cos ^{\frac {7}{2}}(c+d x)}-\frac {1}{5} \left (-10 a A b-5 a^2 B-3 b^2 B-6 a b C\right ) \int \frac {1}{\cos ^{\frac {3}{2}}(c+d x)} \, dx-\frac {1}{21} \left (-14 a b B-7 a^2 (3 A+C)-b^2 (7 A+5 C)\right ) \int \frac {1}{\sqrt {\cos (c+d x)}} \, dx\\ &=\frac {2 \left (14 a b B+7 a^2 (3 A+C)+b^2 (7 A+5 C)\right ) F\left (\left .\frac {1}{2} (c+d x)\right |2\right )}{21 d}+\frac {2 b (7 b B+4 a C) \sin (c+d x)}{35 d \cos ^{\frac {5}{2}}(c+d x)}+\frac {2 \left (7 A b^2+14 a b B+4 a^2 C+5 b^2 C\right ) \sin (c+d x)}{21 d \cos ^{\frac {3}{2}}(c+d x)}+\frac {2 \left (10 a A b+5 a^2 B+3 b^2 B+6 a b C\right ) \sin (c+d x)}{5 d \sqrt {\cos (c+d x)}}+\frac {2 C (b+a \cos (c+d x))^2 \sin (c+d x)}{7 d \cos ^{\frac {7}{2}}(c+d x)}-\frac {1}{5} \left (10 a A b+5 a^2 B+3 b^2 B+6 a b C\right ) \int \sqrt {\cos (c+d x)} \, dx\\ &=-\frac {2 \left (10 a A b+5 a^2 B+3 b^2 B+6 a b C\right ) E\left (\left .\frac {1}{2} (c+d x)\right |2\right )}{5 d}+\frac {2 \left (14 a b B+7 a^2 (3 A+C)+b^2 (7 A+5 C)\right ) F\left (\left .\frac {1}{2} (c+d x)\right |2\right )}{21 d}+\frac {2 b (7 b B+4 a C) \sin (c+d x)}{35 d \cos ^{\frac {5}{2}}(c+d x)}+\frac {2 \left (7 A b^2+14 a b B+4 a^2 C+5 b^2 C\right ) \sin (c+d x)}{21 d \cos ^{\frac {3}{2}}(c+d x)}+\frac {2 \left (10 a A b+5 a^2 B+3 b^2 B+6 a b C\right ) \sin (c+d x)}{5 d \sqrt {\cos (c+d x)}}+\frac {2 C (b+a \cos (c+d x))^2 \sin (c+d x)}{7 d \cos ^{\frac {7}{2}}(c+d x)}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 4.78, size = 218, normalized size = 0.88 \begin {gather*} \frac {2 \left (-21 \left (5 a^2 B+3 b^2 B+2 a b (5 A+3 C)\right ) E\left (\left .\frac {1}{2} (c+d x)\right |2\right )+5 \left (14 a b B+7 a^2 (3 A+C)+b^2 (7 A+5 C)\right ) F\left (\left .\frac {1}{2} (c+d x)\right |2\right )+\frac {15 b^2 C \sin (c+d x)}{\cos ^{\frac {7}{2}}(c+d x)}+\frac {21 b (b B+2 a C) \sin (c+d x)}{\cos ^{\frac {5}{2}}(c+d x)}+\frac {5 \left (7 A b^2+14 a b B+7 a^2 C+5 b^2 C\right ) \sin (c+d x)}{\cos ^{\frac {3}{2}}(c+d x)}+\frac {21 \left (5 a^2 B+3 b^2 B+2 a b (5 A+3 C)\right ) \sin (c+d x)}{\sqrt {\cos (c+d x)}}\right )}{105 d} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [B] Leaf count of result is larger than twice the leaf count of optimal. \(919\) vs.
\(2(281)=562\).
time = 0.46, size = 920, normalized size = 3.69
method | result | size |
default | \(\text {Expression too large to display}\) | \(920\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [C] Result contains higher order function than in optimal. Order 9 vs. order
4.
time = 0.93, size = 357, normalized size = 1.43 \begin {gather*} -\frac {5 \, \sqrt {2} {\left (7 i \, {\left (3 \, A + C\right )} a^{2} + 14 i \, B a b + i \, {\left (7 \, A + 5 \, C\right )} b^{2}\right )} \cos \left (d x + c\right )^{4} {\rm weierstrassPInverse}\left (-4, 0, \cos \left (d x + c\right ) + i \, \sin \left (d x + c\right )\right ) + 5 \, \sqrt {2} {\left (-7 i \, {\left (3 \, A + C\right )} a^{2} - 14 i \, B a b - i \, {\left (7 \, A + 5 \, C\right )} b^{2}\right )} \cos \left (d x + c\right )^{4} {\rm weierstrassPInverse}\left (-4, 0, \cos \left (d x + c\right ) - i \, \sin \left (d x + c\right )\right ) + 21 \, \sqrt {2} {\left (5 i \, B a^{2} + 2 i \, {\left (5 \, A + 3 \, C\right )} a b + 3 i \, B b^{2}\right )} \cos \left (d x + c\right )^{4} {\rm weierstrassZeta}\left (-4, 0, {\rm weierstrassPInverse}\left (-4, 0, \cos \left (d x + c\right ) + i \, \sin \left (d x + c\right )\right )\right ) + 21 \, \sqrt {2} {\left (-5 i \, B a^{2} - 2 i \, {\left (5 \, A + 3 \, C\right )} a b - 3 i \, B b^{2}\right )} \cos \left (d x + c\right )^{4} {\rm weierstrassZeta}\left (-4, 0, {\rm weierstrassPInverse}\left (-4, 0, \cos \left (d x + c\right ) - i \, \sin \left (d x + c\right )\right )\right ) - 2 \, {\left (21 \, {\left (5 \, B a^{2} + 2 \, {\left (5 \, A + 3 \, C\right )} a b + 3 \, B b^{2}\right )} \cos \left (d x + c\right )^{3} + 15 \, C b^{2} + 5 \, {\left (7 \, C a^{2} + 14 \, B a b + {\left (7 \, A + 5 \, C\right )} b^{2}\right )} \cos \left (d x + c\right )^{2} + 21 \, {\left (2 \, C a b + B b^{2}\right )} \cos \left (d x + c\right )\right )} \sqrt {\cos \left (d x + c\right )} \sin \left (d x + c\right )}{105 \, d \cos \left (d x + c\right )^{4}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {\left (a + b \sec {\left (c + d x \right )}\right )^{2} \left (A + B \sec {\left (c + d x \right )} + C \sec ^{2}{\left (c + d x \right )}\right )}{\sqrt {\cos {\left (c + d x \right )}}}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 8.05, size = 343, normalized size = 1.38 \begin {gather*} \frac {6\,B\,b^2\,\sin \left (c+d\,x\right )\,{{}}_2{\mathrm {F}}_1\left (-\frac {5}{4},\frac {1}{2};\ -\frac {1}{4};\ {\cos \left (c+d\,x\right )}^2\right )+30\,B\,a^2\,{\cos \left (c+d\,x\right )}^2\,\sin \left (c+d\,x\right )\,{{}}_2{\mathrm {F}}_1\left (-\frac {1}{4},\frac {1}{2};\ \frac {3}{4};\ {\cos \left (c+d\,x\right )}^2\right )+20\,B\,a\,b\,\cos \left (c+d\,x\right )\,\sin \left (c+d\,x\right )\,{{}}_2{\mathrm {F}}_1\left (-\frac {3}{4},\frac {1}{2};\ \frac {1}{4};\ {\cos \left (c+d\,x\right )}^2\right )}{15\,d\,{\cos \left (c+d\,x\right )}^{5/2}\,\sqrt {1-{\cos \left (c+d\,x\right )}^2}}+\frac {30\,C\,b^2\,\sin \left (c+d\,x\right )\,{{}}_2{\mathrm {F}}_1\left (-\frac {7}{4},\frac {1}{2};\ -\frac {3}{4};\ {\cos \left (c+d\,x\right )}^2\right )+70\,C\,a^2\,{\cos \left (c+d\,x\right )}^2\,\sin \left (c+d\,x\right )\,{{}}_2{\mathrm {F}}_1\left (-\frac {3}{4},\frac {1}{2};\ \frac {1}{4};\ {\cos \left (c+d\,x\right )}^2\right )+84\,C\,a\,b\,\cos \left (c+d\,x\right )\,\sin \left (c+d\,x\right )\,{{}}_2{\mathrm {F}}_1\left (-\frac {5}{4},\frac {1}{2};\ -\frac {1}{4};\ {\cos \left (c+d\,x\right )}^2\right )}{105\,d\,{\cos \left (c+d\,x\right )}^{7/2}\,\sqrt {1-{\cos \left (c+d\,x\right )}^2}}+\frac {2\,A\,a^2\,\mathrm {F}\left (\frac {c}{2}+\frac {d\,x}{2}\middle |2\right )}{d}+\frac {2\,A\,b^2\,\sin \left (c+d\,x\right )\,{{}}_2{\mathrm {F}}_1\left (-\frac {3}{4},\frac {1}{2};\ \frac {1}{4};\ {\cos \left (c+d\,x\right )}^2\right )}{3\,d\,{\cos \left (c+d\,x\right )}^{3/2}\,\sqrt {{\sin \left (c+d\,x\right )}^2}}+\frac {4\,A\,a\,b\,\sin \left (c+d\,x\right )\,{{}}_2{\mathrm {F}}_1\left (-\frac {1}{4},\frac {1}{2};\ \frac {3}{4};\ {\cos \left (c+d\,x\right )}^2\right )}{d\,\sqrt {\cos \left (c+d\,x\right )}\,\sqrt {{\sin \left (c+d\,x\right )}^2}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________